﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TreesLib;

namespace M_U_B {
    class Program {
        static void findSetDemo() {
            TreesLib.NaryNode<string> r = TreesLib.NarySamples.stringDepth4Kids0to5;
            Console.WriteLine("{0}original tree: {0}\t{1} ", Environment.NewLine, TreesLib.NaryUtil.printSimple<string>(r));
            NaryNode<string> RaCd = r.AllKids.First().AllKids.ElementAt(2).AllKids.ElementAt(3);
            Console.WriteLine("RaCd = " + RaCd);

            Console.WriteLine("FindSet node = " + TreesLib.NaryNode<string>.FindSet(RaCd));
            Console.WriteLine("{0}original tree after findset : {0}\t{1} ", Environment.NewLine, TreesLib.NaryUtil.printSimple<string>(r));
        }
        static void Main(string[] args) {
            findSetDemo();
        }
    }
}
